import pandas as pd
import urllib
import numpy as np
import urllib.request
import re
from textblob import TextBlob
%run lib.py
#name="Legally%20Blonde"
#name="aboutmary"
#name="10Things"
name="magnolia"
#name="Friday%20The%2013th"
#name="Ghost%20Ship"
#name="Juno"
#name="Reservoir+Dogs"
#name="shawshank"
#name="Sixth%20Sense,%20The"
#name="sunset_bld_3_21_49"
#name="Titanic"
#name="toy_story"
#name="trainspotting"
#name="transformers"
#name="the-truman-show_shooting"
#name="batman_production"
ext="html"
txtfiles=["Ghost%20Ship", "Legally%20Blonde", "Friday%20The%2013th", "Juno", "Reservoir+Dogs", "Sixth%20Sense,%20The", "Titanic"]
if name in txtfiles:
ext="txt"
fp = urllib.request.urlopen("http://www.dailyscript.com/scripts/"+name+"."+ext)
mybytes = fp.read()
mystr = mybytes.decode("utf8", "ignore")
fp.close()
liston=mystr.split("\n")
liston=[s.replace('\r', '') for s in liston]
liston=[re.sub('<[^<]+?>', '', text) for text in liston]
if name=="shawshank":
liston=[i.replace("\t", " ") for i in liston]
char=""
script=[]
charintro=' '
endofdialogue=' '
dialoguepre=' '
newscenepre=' '
charintro=''
endofdialogue=''
dialoguepre=''
newscenepre=''
i=45
print("Characters")
i, charintro=nextbigchunk(liston, i)
print("Adverbs")
i, adverb=nextbigchunk(liston, i, adverbs=True)
print("Dialogues")
i, dialoguepre=nextbigchunk(liston, i)
print("New Scene:")
i, newscenepre=nextbigchunk(liston, i)
if newscenepre=="X":
i=100
i, newscenepre=nextbigchunk(liston, i)
if name=="aboutmary":
newscenepre=" ".join(["" for i in range(56)])
if len(newscenepre)==len(charintro):
newscenepre="X"
endofdialogue=newscenepre
scene=1
for s in liston:
if s[0:len(charintro)]==charintro and s[len(charintro)]!=" " and s.strip()[0]!="(" and s.strip()[len(s.strip())-1]!=")":
#print("Charatcer*****")
char=s[len(charintro):]
new=dict()
new['char']=char.strip()
new['dialogue']=""
new['scene']=scene
new['adverb']=""
if s==endofdialogue or s.replace(" ", "")=="":
if char!="":
char=""
script.append(new)
if char!="" and s[0:len(dialoguepre)]==dialoguepre and s[len(dialoguepre)]!=" ":
#print("Dialogue******")
if new['dialogue']!="":
new['dialogue']=new['dialogue']+" "
new['dialogue']=new['dialogue']+s[len(dialoguepre):]
if char!="" and ((s[0:len(adverb)]==adverb and s[len(adverb)]!=" ") or (len(s)>1 and s.strip()[0]=="(" and s.strip()[len(s.strip())-1]==")" )):
if new['adverb']!="":
new['adverb']=new['adverb']+" "
new['adverb']=new['adverb']+s[len(adverb):]
if s[0:len(newscenepre)]==newscenepre and len(s)>len(newscenepre) and ( s.isupper()) and s[len(newscenepre)]!=" ":
scene=scene+1
pd.DataFrame(script).to_csv(name+'.csv', index=None)
pd.DataFrame(script)
magnolia=pd.read_csv(name+'.csv')
stopwords = getstopwords()
removedchars=["'S VOICE", "'S WHISPER VOICE", " GATOR"]
for s in removedchars:
magnolia['char']=magnolia['char'].apply(lambda x: x.replace(s, ""))
i=0
scenes=dict()
for s in magnolia.iterrows():
scenes[s[1]['scene']]=[]
for s in magnolia.iterrows():
scenes[s[1]['scene']].append(s[1]['char'])
for s in magnolia.iterrows():
scenes[s[1]['scene']]=list(set(scenes[s[1]['scene']]))
characters=[]
for s in scenes:
for k in scenes[s]:
characters.append(k)
characters=list(set(characters))
appearances=dict()
for s in characters:
appearances[s]=0
for s in magnolia.iterrows():
appearances[s[1]['char']]=appearances[s[1]['char']]+1
a=pd.DataFrame(appearances, index=[i for i in range(len(appearances))])
finalcharacters=[]
for s in pd.DataFrame(a.transpose()[0].sort_values(0, ascending=False))[0:10].iterrows():
finalcharacters.append(s[0])
finalcharacters
file=open(name+"_nodes.csv", "w")
couplesappearances=dict()
for s in finalcharacters:
file.write(";")
file.write(s)
file.write("\n")
for s in finalcharacters:
newlist=[]
for f in finalcharacters:
newlist.append(0)
couplesappearances[f+"_"+s]=0
j=0
for f in finalcharacters:
for p in scenes:
if f in scenes[p] and s in scenes[p] and f!=s and finalcharacters.index(f)<finalcharacters.index(s):
long=len(magnolia[magnolia["scene"]==p])
newlist[j]=newlist[j]+long
couplesappearances[f+"_"+s]=couplesappearances[f+"_"+s]+long
j=j+1
file.write(s)
for f in newlist:
file.write(";")
file.write(str(f))
file.write("\n")
file.close()
a=pd.DataFrame(couplesappearances, index=[i for i in range(len(couplesappearances))])
finalcouples=[]
for s in pd.DataFrame(a.transpose()[0].sort_values(0, ascending=False))[0:4].iterrows():
finalcouples.append(s[0])
file=open(name+"_finalcharacters.csv", "w")
for s in finalcharacters:
file.write(s+"\n")
file.close()
file=open(name+"_finalcouples.csv", "w")
for s in finalcouples:
file.write(s+"\n")
file.close()
importantchars=[]
for char in appearances:
if appearances[char]>10:
importantchars.append(char)
file=open(name+"_sentiment_overtime_individual.csv", "w")
file2=open(name+"_sentiment_overtime_individualminsmaxs.csv", "w")
for k in finalcharacters:
print(k)
dd=getdialogue(magnolia, k, k, scenes)
dd=[str(d) for d in dd]
polarities, subjectivities=getsentiment(dd)
%matplotlib inline
import matplotlib.pyplot as plt
moveda=maverage(polarities, dd, .99)
plt.plot(moveda)
i=0
for s in moveda:
file.write(k+","+str(float(i)/len(moveda))+", "+str(s)+"\n")
i=i+1
plt.ylabel('polarities')
plt.show()
file2.write(k+"| MIN| "+dd[moveda.index(np.min(moveda))]+"\n")
file2.write(k+"| MAX| "+dd[moveda.index(np.max(moveda))]+"\n")
print("MIN: "+dd[moveda.index(np.min(moveda))])
print("\n")
print("MAX: "+dd[moveda.index(np.max(moveda))])
file.close()
file2.close()
file=open(name+"_sentiment_overtime_couples.csv", "w")
file2=open(name+"_sentiment_overtime_couplesminsmaxs.csv", "w")
for k in finalcouples:
print(k)
liston=k.split("_")
dd=getdialogue(magnolia, liston[0], liston[1], scenes)
dd=[str(d) for d in dd]
polarities, subjectivities=getsentiment(dd)
%matplotlib inline
import matplotlib.pyplot as plt
moveda=maverage(polarities, dd, .99)
plt.plot(moveda)
i=0
for s in moveda:
file.write(k+","+str(float(i)/len(moveda))+", "+str(s)+"\n")
i=i+1
plt.ylabel('polarities')
plt.show()
file2.write(k+"| MIN| "+dd[moveda.index(np.min(moveda))]+"\n")
file2.write(k+"| MAX| "+dd[moveda.index(np.max(moveda))]+"\n")
print("MIN: "+dd[moveda.index(np.min(moveda))])
print("\n")
print("MAX: "+dd[moveda.index(np.max(moveda))])
file.close()
file2.close()
for key, val in scenes.items():
for s in scenes[key]:
new="INSCENE_"+scenes[key][0]
scenes[key].remove(scenes[key][0])
scenes[key].append(new)
magnolia.dropna(subset=['dialogue'])
1
baskets=[]
spchars=["\"", "'", ".", ",", "-"]
attributes=["?", "!"]
for s in magnolia.iterrows():
if type(s[1]['dialogue'])!=float and len(s[1]['dialogue'])>0:
new=[]
for k in scenes[s[1]['scene']]:
new.append(k)
new.append("SPEAKING_"+s[1]['char'])
for k in s[1]['dialogue'].split(" "):
ko=k
for t in spchars:
ko=ko.replace(t, "")
for t in attributes:
if ko.find(t)>=0:
new.append(t)
ko=ko.replace(t, "")
if len(ko)>0:
new.append(ko.lower())
new=list(set(new))
baskets.append(new)
baskets2=[]
basketslist=[]
for k in baskets:
new=dict()
new2=[]
for t in k:
if t not in stopwords:
new[t]=1
new2.append(t)
baskets2.append(new)
basketslist.append(new2)
baskets2=pd.DataFrame(baskets2)
from mlxtend.frequent_patterns import apriori
from mlxtend.frequent_patterns import association_rules
baskets2=baskets2.fillna(0)
baskets2.to_csv(name+'_basket.csv')
frequent_itemsets = apriori(baskets2, min_support=5/len(baskets2), use_colnames=True)
rules = association_rules(frequent_itemsets, metric="lift", min_threshold=1)
rules['one_lower']=[int(alllower(i) or alllower(j)) for i, j in zip(rules['antecedants'], rules['consequents'])]
rules['both_lower']=[int(alllower(i) and alllower(j)) for i, j in zip(rules['antecedants'], rules['consequents'])]
rules.to_csv(name+'_rules.csv', index=None)
| . |
|---|
| LEGALLY BLONDE |
| Palabras Distintas |
|---|
| 1900 |
| Descripcion | Score | % Founded Words |
|---|---|---|
| Entre 0 (negativo) y 10 (positivo) | 5.332362 | 12.8% |
| sentiment | Porcentaje |
|---|---|
| positive | 61.7% |
| negative | 38.3% |
| sentiment | Porcentaje |
|---|---|
| positive | 19.7% |
| trust | 15.7% |
| negative | 13.5% |
| anticipation | 10.6% |
| joy | 9.4% |
| fear | 8.3% |
| sadness | 7.0% |
| anger | 6.7% |
| surprise | 4.8% |
| disgust | 4.4% |
| sentiment | Porcentaje |
|---|---|
| negative | 33.3% |
| litigious | 24.0% |
| positive | 22.6% |
| uncertainty | 18.5% |
| constraining | 1.7% |
[1] “Analisis de Sentimientos del Personaje: ELLE” [1] “Numero total de Palabras Unicas en el texto: 1095”
| Descripcion | Score | % Founded Words |
|---|---|---|
| Entre 0 (negativo) y 10 (positivo) | 5.60473 | 12.7% |
| sentiment | Porcentaje |
|---|---|
| positive | 64.3% |
| negative | 35.7% |
| sentiment | Porcentaje |
|---|---|
| positive | 21.2% |
| trust | 17.7% |
| negative | 12.1% |
| anticipation | 11.3% |
| joy | 11.0% |
| fear | 7.4% |
| sadness | 5.9% |
| anger | 5.8% |
| surprise | 4.4% |
| disgust | 3.3% |
| sentiment | Porcentaje |
|---|---|
| negative | 35.1% |
| positive | 26.5% |
| litigious | 23.2% |
| uncertainty | 14.1% |
| constraining | 1.1% |
[1] “Analisis de Sentimientos del Personaje: EMMETT” [1] “Numero total de Palabras Unicas en el texto: 295”
| Descripcion | Score | % Founded Words |
|---|---|---|
| Entre 0 (negativo) y 10 (positivo) | 4.923077 | 9.83% |
| sentiment | Porcentaje |
|---|---|
| positive | 58.1% |
| negative | 41.9% |
| sentiment | Porcentaje |
|---|---|
| positive | 18.2% |
| negative | 15.3% |
| anticipation | 13.1% |
| trust | 13.1% |
| fear | 9.5% |
| joy | 8.0% |
| sadness | 8.0% |
| anger | 5.8% |
| disgust | 5.1% |
| surprise | 3.6% |
| sentiment | Porcentaje |
|---|---|
| uncertainty | 37.5% |
| negative | 29.2% |
| positive | 29.2% |
| litigious | 4.2% |
[1] “Analisis de Sentimientos del Personaje: DONOVAN” [1] “Numero total de Palabras Unicas en el texto: 276”
| Descripcion | Score | % Founded Words |
|---|---|---|
| Entre 0 (negativo) y 10 (positivo) | 4.954545 | 11.6% |
| sentiment | Porcentaje |
|---|---|
| positive | 53.33% |
| negative | 46.67% |
| sentiment | Porcentaje |
|---|---|
| trust | 14.92% |
| positive | 14.36% |
| negative | 12.71% |
| anger | 10.50% |
| fear | 10.50% |
| anticipation | 8.84% |
| sadness | 8.84% |
| disgust | 6.63% |
| surprise | 6.63% |
| joy | 6.08% |
| sentiment | Porcentaje |
|---|---|
| positive | 33.3% |
| litigious | 26.7% |
| uncertainty | 23.3% |
| negative | 16.7% |
[1] “Analisis de Sentimientos del Personaje: WARNER” [1] “Numero total de Palabras Unicas en el texto: 261”
| Descripcion | Score | % Founded Words |
|---|---|---|
| Entre 0 (negativo) y 10 (positivo) | 5.962963 | 8.43% |
| sentiment | Porcentaje |
|---|---|
| positive | 78.3% |
| negative | 21.7% |
| sentiment | Porcentaje |
|---|---|
| positive | 22.2% |
| anticipation | 20.2% |
| trust | 17.2% |
| joy | 12.1% |
| surprise | 9.1% |
| negative | 7.1% |
| fear | 5.1% |
| sadness | 4.0% |
| disgust | 2.0% |
| anger | 1.0% |
| sentiment | Porcentaje |
|---|---|
| negative | 40.0% |
| litigious | 26.7% |
| positive | 20.0% |
| uncertainty | 13.3% |
[1] “Analisis de Sentimientos del Personaje: SARAH” [1] “Numero total de Palabras Unicas en el texto: 206”
| Descripcion | Score | % Founded Words |
|---|---|---|
| Entre 0 (negativo) y 10 (positivo) | 4.636364 | 9.22% |
| sentiment | Porcentaje |
|---|---|
| positive | 52.38% |
| negative | 47.62% |
| sentiment | Porcentaje |
|---|---|
| negative | 21.1% |
| positive | 17.1% |
| anger | 11.8% |
| fear | 11.8% |
| sadness | 9.2% |
| anticipation | 7.9% |
| trust | 7.9% |
| joy | 6.6% |
| disgust | 5.3% |
| surprise | 1.3% |
| sentiment | Porcentaje |
|---|---|
| negative | 28.6% |
| uncertainty | 28.6% |
| litigious | 23.8% |
| positive | 14.3% |
| constraining | 4.8% |
[1] “Analisis de Sentimientos del Personaje: SERENA” [1] “Numero total de Palabras Unicas en el texto: 198”
| Descripcion | Score | % Founded Words |
|---|---|---|
| Entre 0 (negativo) y 10 (positivo) | 4.466667 | 7.07% |
| sentiment | Porcentaje |
|---|---|
| negative | 55.6% |
| positive | 44.4% |
| sentiment | Porcentaje |
|---|---|
| positive | 20.8% |
| anticipation | 18.1% |
| trust | 16.7% |
| negative | 13.9% |
| joy | 8.3% |
| fear | 6.9% |
| sadness | 5.6% |
| anger | 4.2% |
| disgust | 4.2% |
| surprise | 1.4% |
| sentiment | Porcentaje |
|---|---|
| negative | 45.5% |
| uncertainty | 36.4% |
| litigious | 9.1% |
| positive | 9.1% |
[1] “Analisis de Sentimientos del Personaje: MARGOT” [1] “Numero total de Palabras Unicas en el texto: 197”
| Descripcion | Score | % Founded Words |
|---|---|---|
| Entre 0 (negativo) y 10 (positivo) | 6.142857 | 11.7% |
| sentiment | Porcentaje |
|---|---|
| positive | 77.3% |
| negative | 22.7% |
| sentiment | Porcentaje |
|---|---|
| positive | 28.6% |
| joy | 16.3% |
| trust | 12.2% |
| surprise | 10.2% |
| fear | 8.2% |
| disgust | 6.1% |
| negative | 6.1% |
| anger | 4.1% |
| anticipation | 4.1% |
| sadness | 4.1% |
| sentiment | Porcentaje |
|---|---|
| positive | 37.5% |
| litigious | 25.0% |
| negative | 25.0% |
| uncertainty | 12.5% |
[1] “Analisis de Sentimientos del Personaje: BROOKE” [1] “Numero total de Palabras Unicas en el texto: 194”
| Descripcion | Score | % Founded Words |
|---|---|---|
| Entre 0 (negativo) y 10 (positivo) | 4.612903 | 13.9% |
| sentiment | Porcentaje |
|---|---|
| positive | 58.1% |
| negative | 41.9% |
| sentiment | Porcentaje |
|---|---|
| negative | 20.6% |
| sadness | 12.7% |
| anger | 9.8% |
| fear | 9.8% |
| positive | 9.8% |
| trust | 9.8% |
| joy | 7.8% |
| disgust | 6.9% |
| surprise | 6.9% |
| anticipation | 5.9% |
| sentiment | Porcentaje |
|---|---|
| negative | 52.9% |
| positive | 29.4% |
| litigious | 11.8% |
| uncertainty | 5.9% |
[1] “Analisis de Sentimientos del Personaje: PAULETTE” [1] “Numero total de Palabras Unicas en el texto: 225”
| Descripcion | Score | % Founded Words |
|---|---|---|
| Entre 0 (negativo) y 10 (positivo) | 5.257143 | 12.4% |
| sentiment | Porcentaje |
|---|---|
| positive | 59.3% |
| negative | 40.7% |
| sentiment | Porcentaje |
|---|---|
| positive | 18.7% |
| joy | 15.0% |
| anticipation | 12.1% |
| negative | 12.1% |
| trust | 11.2% |
| fear | 7.5% |
| disgust | 6.5% |
| sadness | 6.5% |
| surprise | 6.5% |
| anger | 3.7% |
| sentiment | Porcentaje |
|---|---|
| positive | 33.3% |
| uncertainty | 33.3% |
| negative | 25.0% |
| litigious | 8.3% |
[1] “Analisis de Sentimientos del Personaje: PROFESSOR STROMWELL” [1] “Numero total de Palabras Unicas en el texto: 176”
| Descripcion | Score | % Founded Words |
|---|---|---|
| Entre 0 (negativo) y 10 (positivo) | 5.2 | 10.8% |
| sentiment | Porcentaje |
|---|---|
| positive | 59.1% |
| negative | 40.9% |
| sentiment | Porcentaje |
|---|---|
| negative | 20.8% |
| positive | 18.2% |
| trust | 15.6% |
| anticipation | 10.4% |
| anger | 7.8% |
| fear | 7.8% |
| joy | 6.5% |
| sadness | 6.5% |
| surprise | 3.9% |
| disgust | 2.6% |
| sentiment | Porcentaje |
|---|---|
| litigious | 35% |
| negative | 20% |
| uncertainty | 20% |
| positive | 15% |
| constraining | 10% |
[1] “Analisis de Sentimientos del Personaje: PROFESSOR DONOVAN” [1] “Numero total de Palabras Unicas en el texto: 220”
| Descripcion | Score | % Founded Words |
|---|---|---|
| Entre 0 (negativo) y 10 (positivo) | 4.826087 | 9.09% |
| sentiment | Porcentaje |
|---|---|
| positive | 55% |
| negative | 45% |
| sentiment | Porcentaje |
|---|---|
| positive | 20% |
| negative | 17% |
| trust | 16% |
| anticipation | 10% |
| fear | 10% |
| anger | 9% |
| sadness | 8% |
| disgust | 4% |
| joy | 3% |
| surprise | 3% |
| sentiment | Porcentaje |
|---|---|
| negative | 40% |
| litigious | 30% |
| uncertainty | 20% |
| constraining | 5% |
| positive | 5% |
[1] “Analisis de Sentimientos del Personaje: CHUTNEY” [1] “Numero total de Palabras Unicas en el texto: 92”
| Descripcion | Score | % Founded Words |
|---|---|---|
| Entre 0 (negativo) y 10 (positivo) | 4.466667 | 8.7% |
| sentiment | Porcentaje |
|---|---|
| negative | 75% |
| positive | 25% |
| sentiment | Porcentaje |
|---|---|
| positive | 22.2% |
| fear | 18.5% |
| anger | 14.8% |
| negative | 14.8% |
| trust | 11.1% |
| sadness | 7.4% |
| surprise | 7.4% |
| disgust | 3.7% |
Table: Porcentaje de Palabras encontradas por tipo de sentimiento ( loughran ) 0%
sentiment Porcentaje ———- ————
[1] “Analisis de Sentimientos del Personaje: DORKY DAVID” [1] “Numero total de Palabras Unicas en el texto: 76”
| Descripcion | Score | % Founded Words |
|---|---|---|
| Entre 0 (negativo) y 10 (positivo) | 4.333333 | 3.95% |
| sentiment | Porcentaje |
|---|---|
| negative | 50% |
| positive | 50% |
| sentiment | Porcentaje |
|---|---|
| fear | 18.2% |
| positive | 18.2% |
| trust | 18.2% |
| anger | 9.1% |
| anticipation | 9.1% |
| negative | 9.1% |
| sadness | 9.1% |
| disgust | 4.5% |
| surprise | 4.5% |
| sentiment | Porcentaje |
|---|---|
| litigious | 42.9% |
| uncertainty | 42.9% |
| negative | 14.3% |
[1] “Analisis de Sentimientos del Personaje: ENID” [1] “Numero total de Palabras Unicas en el texto: 143”
| Descripcion | Score | % Founded Words |
|---|---|---|
| Entre 0 (negativo) y 10 (positivo) | 4.714286 | 4.9% |
| sentiment | Porcentaje |
|---|---|
| negative | 50% |
| positive | 50% |
| sentiment | Porcentaje |
|---|---|
| positive | 19.4% |
| negative | 16.7% |
| anger | 13.9% |
| trust | 13.9% |
| anticipation | 11.1% |
| fear | 11.1% |
| disgust | 5.6% |
| sadness | 5.6% |
| joy | 2.8% |
| sentiment | Porcentaje |
|---|---|
| negative | 28.6% |
| uncertainty | 28.6% |
| constraining | 14.3% |
| litigious | 14.3% |
| positive | 14.3% |
[1] “Analisis de Sentimientos del Personaje: ENRIQUE” [1] “Numero total de Palabras Unicas en el texto: 79”
| Descripcion | Score | % Founded Words |
|---|---|---|
| Entre 0 (negativo) y 10 (positivo) | 5.3125 | 13.9% |
| sentiment | Porcentaje |
|---|---|
| negative | 50% |
| positive | 50% |
| sentiment | Porcentaje |
|---|---|
| positive | 22.7% |
| joy | 18.2% |
| trust | 13.6% |
| negative | 9.1% |
| sadness | 9.1% |
| surprise | 9.1% |
| anger | 4.5% |
| anticipation | 4.5% |
| disgust | 4.5% |
| fear | 4.5% |
| sentiment | Porcentaje |
|---|---|
| negative | 66.7% |
| uncertainty | 33.3% |
[1] “Analisis de Sentimientos del Personaje: JUDGE” [1] “Numero total de Palabras Unicas en el texto: 67”
| Descripcion | Score | % Founded Words |
|---|---|---|
| Entre 0 (negativo) y 10 (positivo) | 4 | 5.97% |
| sentiment | Porcentaje |
|---|---|
| positive | 66.7% |
| negative | 33.3% |
| sentiment | Porcentaje |
|---|---|
| trust | 35.7% |
| positive | 28.6% |
| anger | 7.1% |
| anticipation | 7.1% |
| fear | 7.1% |
| negative | 7.1% |
| sadness | 7.1% |
| sentiment | Porcentaje |
|---|---|
| litigious | 55.6% |
| negative | 33.3% |
| uncertainty | 11.1% |
[1] “Analisis de Sentimientos del Personaje: MRS. WINDHAM VANDERMARK” [1] “Numero total de Palabras Unicas en el texto: 117”
| Descripcion | Score | % Founded Words |
|---|---|---|
| Entre 0 (negativo) y 10 (positivo) | 7 | 0.855% |
| sentiment | Porcentaje |
|---|---|
| positive | 83.3% |
| negative | 16.7% |
| sentiment | Porcentaje |
|---|---|
| positive | 22.6% |
| negative | 16.1% |
| anticipation | 9.7% |
| joy | 9.7% |
| surprise | 9.7% |
| trust | 9.7% |
| anger | 6.5% |
| disgust | 6.5% |
| fear | 6.5% |
| sadness | 3.2% |
| sentiment | Porcentaje |
|---|---|
| uncertainty | 100% |
| Personaje | Min_Max | Dialogo |
|---|---|---|
| ELLE | MIN | She could use some mascara and some serious highlights, but she’s not completely unfortunate-looking. |
| ELLE | MAX | Is everything okay? |
| EMMETT | MIN | I don’t – Do that stuff. |
| EMMETT | MAX | Good luck. |
| DONOVAN | MIN | What are you talking about? |
| DONOVAN | MAX | You’re a beautiful girl, Elle. |
| WARNER | MIN | You got into Harvard Law? |
| WARNER | MAX | Come on, we can make room for one more. |
| SARAH | MIN | Have you ever noticed that Donovan never asks Warner to bring him coffee? He’s asked me at least a dozen times. |
| SARAH | MAX | This should be amusing. |
| SERENA | MIN | There he is! |
| SERENA | MAX | What’s the thing that always makes us feel better, no matter what? |
| MARGOT | MIN | Why else would he be taking you to The Ivy? You’ve been dating for a year – it’s not like he’s trying to impress you. |
| MARGOT | MAX | Jesus. Talk about a Rock. You must be better in bed than you look. |
| PAULETTE | MIN | I’m taking the dog dumbass. C’mere, baby, Mommy’s here! |
| PAULETTE | MAX | Elle, you’ve changed my life. You are the kindest, most wonderful angel. Without you, I wouldn’t have Rufus or a dinner date. Now go and share your goodness with the world while I stay here and have my hoo-hoo waxed. |
| BROOKE | MIN | Hey – I know you. |
| BROOKE | MAX | But is he an ass that’s gonna win my case? |
| PROFESSOR STROMWELL | MIN | If you let one stupid prick ruin your life, you’re not the girl I thought you were. |
| PROFESSOR STROMWELL | MAX | “An image and a good hook can get you into a room – but something has to keep you in that room.” |
| Parejas | Min_Max | Dialogo |
|---|---|---|
| ELLE_EMMETT | MIN | You’re serious? |
| ELLE_EMMETT | MAX | Thanks for the backup. |
| ELLE_SARAH | MIN | The idiot speaks. |
| ELLE_SARAH | MAX | Maybe you should sleep with the judge too. Then we can win the case. |
| ELLE_WARNER | MIN | I just don’t want to see you get your hopes up. You know how you get. |
| ELLE_WARNER | MAX | How was I supposed to know what kind of shoes you had on? |
| ELLE_SERENA | MIN | Bring her, too. C’mon. You can wear one of Elle’s outfits. |
| ELLE_SERENA | MAX | What’s the thing that always makes us feel better, no matter what? |
## [1] "Lift Promedio de las Reglas de Asociacion: 22.3450974069944"
## [1] "Desviación estandar del Lift de las Reglas de Asociacion: 15.4146554119165"
## [1] "Deciles del Lift : "
## 10% 20% 30% 40% 50% 60%
## 3.254967 7.503817 11.702381 14.455882 20.914894 25.868421
## 70% 80% 90% 100%
## 32.766667 37.807692 40.958333 196.600000
| Numero de Dialogos | Lift Minimo | Lift Maximo |
|---|---|---|
| 24,514 | -3 | 3 |
| 31,078 | 3 | 10 |
| 44,326 | 10 | 17 |
| 32,304 | 17 | 24 |
| 22,552 | 24 | 30 |
| 26,030 | 30 | 37 |
## [1] "Leverage Promedio de las Reglas de Asociacion: 0.00797707699313047"
## [1] "Desviación estandar del Leverage de las Reglas de Asociacion: 0.0063592855856971"
## [1] "Deciles del Leverage : "
## 10% 20% 30% 40% 50% 60%
## 0.004288572 0.004729434 0.004843272 0.004946760 0.004993330 0.005917484
## 70% 80% 90% 100%
## 0.007923095 0.011580386 0.014849595 0.128001043
| Numero de Dialogos | Leverage Minimo | Leverage Maximo |
|---|---|---|
| 10,368 | -0.0022 | 0.0022 |
| 133,500 | 0.0022 | 0.0066 |
| 39,562 | 0.0066 | 0.011 |
| 26,028 | 0.011 | 0.015 |
| 7,912 | 0.015 | 0.02 |
| 5,684 | 0.02 | 0.024 |
Pagerank: Legally Blonde.